package com.qzsoft.zhjd.machine.modules.machinerealtime.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @ClassName MachineStateCountDto
 * @Description 设备状态统计
 * @author linhuawei
 * @since 2021-11-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ToString
public class MachineStateCountDto {

    /**
     * 未入网
     */
    private Integer unbind;

    /**
     * 正在入网
     */
    private Integer binded;

    /**
     * 已入网
     */
    private Integer online;

    /**
     * 怠速
     */
    private Integer idle;

    /**
     * 停止
     */
    private Integer off;

    /**
     * 离线
     */
    private Integer outWatching;

    /**
     * 运行
     */
    private Integer working;

    /**
     * 未入网
     */
    private Integer unOnline;

    public Integer getOnline() {
        online = idle + off + outWatching + working;
        return online;
    }

    public Integer getUnOnline() {
        unOnline = unbind + binded;
        return unOnline;
    }

}
